home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / New System Software Extensions / Telephone Manager 1.1.1 / Install / Development / TelephoneTools.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-20  |  5.7 KB  |  282 lines  |  [TEXT/MPS ]

  1.  
  2. /************************************************************
  3.  
  4.  TelephoneTools.h
  5.  C Interface to the Telephone Manager
  6.  
  7.  
  8.   Copyright Apple Computer, Inc. 1990-1993
  9.   All rights reserved
  10.  
  11. ************************************************************/
  12.  
  13.  
  14. #ifndef __TELEPHONETOOLS_
  15. #define __TELEPHONETOOLS_
  16.  
  17.  
  18. #ifndef __DIALOGS__
  19. #include <Dialogs.h>
  20. #endif
  21.  
  22. #ifndef __TYPES__
  23. #include <Types.h>
  24. #endif
  25.  
  26.  
  27. #define vdefType    'vdef'        /* main telephone definition procedure    */
  28. #define vvalType    'vval'        /* validation definition procedure    */
  29. #define vsetType    'vset'        /* telephone setup definition procedure    */
  30. #define vlocType    'vloc'        /* telephone configuration localization defProc    */
  31. #define vscrType    'vscr'        /* telephone scripting defProc interfaces    */
  32.  
  33. #define vbndType    'vbnd'        /* bundle type for telephone */
  34.  
  35.  
  36. struct TELSetupStruct {
  37.     DialogPtr     theDialog;
  38.     short        count;
  39.     Ptr         theConfig;
  40.     short        procID;
  41. };
  42.  
  43. typedef struct TELSetupStruct TELSetupStruct;
  44. typedef TELSetupStruct *TELSetupPtr;
  45.  
  46. struct TELForwardPB {
  47.     StringPtr            forwardDN;
  48.     StringPtr            forwardPartyName;
  49.     StringPtr            forwardSubaddress;
  50.     short                forwardType;
  51.     short                numRings;
  52. };
  53.  
  54. typedef struct TELForwardPB TELForwardPB;
  55.  
  56.  
  57. struct TELTermMsgPB{
  58.     short                toolID;
  59.     short                tRef;
  60.     long                msg;
  61.     short                mtype;
  62.     short                value;
  63. };
  64.  
  65. typedef struct TELTermMsgPB TELTermMsgPB;
  66.  
  67. struct TELDNMsgPB {
  68.     short                toolID;
  69.     short                tRef;
  70.     short                dnRef;
  71.     long                msg;
  72.     short                mtype;
  73.     short                value;
  74.     StringPtr            rmtDN;
  75.     StringPtr            rmtName;
  76.     StringPtr            rmtSubaddress;
  77. };
  78.  
  79. typedef struct TELDNMsgPB TELDNMsgPB;
  80.  
  81. struct TELCAGenericMsgPB {
  82.     short                toolID;
  83.     short                tRef;
  84.     short                dnRef;
  85.     short                caRef;
  86.     long                msg;
  87.     short                mtype;
  88.     short                value;
  89.     StringPtr            rmtDN;
  90.     StringPtr            rmtName;
  91.     StringPtr            rmtSubaddress;
  92.     short                dialType;
  93. };
  94. typedef struct TELCAGenericMsgPB TELCAGenericMsgPB;
  95.  
  96. struct TELCADisconMsgPB {
  97.     short                toolID;
  98.     short                tRef;
  99.     short                dnRef;
  100.     short                caRef;
  101.     long                msg;
  102.     short                mtype;
  103.     short                value;
  104. };
  105. typedef struct TELCADisconMsgPB TELCADisconMsgPB;
  106.  
  107. struct TELCAConfMsgPB {
  108.     short                toolID;
  109.     short                tRef;
  110.     short                dnRef;
  111.     short                caRef;
  112.     long                msg;
  113.     short                mtype;
  114.     short                value;
  115. };
  116. typedef struct TELCAConfMsgPB TELCAConfMsgPB;
  117.  
  118. struct TELCATransfMsgPB {
  119.     short                toolID;
  120.     short                tRef;
  121.     short                dnRef;
  122.     short                caRef;
  123.     long                msg;
  124.     short                mtype;
  125.     short                value;
  126.     StringPtr            rmtDN;
  127.     StringPtr            rmtName;
  128.     StringPtr            rmtSubaddress;
  129.     short                dialType;
  130. };
  131. typedef struct TELCATransfMsgPB TELCATransfMsgPB;
  132.  
  133. /********************************************************************************/
  134. /*  The following two message blocks are sent when the tool has outgoing call   */
  135. /*  or incoming call information, but no handle has been allocated for the call */
  136. /********************************************************************************/
  137.  
  138. /* used by tool to send CAOffer and CAAlerting messages to the Manager Master Message Handler */
  139. struct TELCAInOutMsgPB {
  140.     short                toolID;
  141.     short                tRef;
  142.     short                dnRef;
  143.     short                caRef;
  144.     long                msg;
  145.     short                mtype;
  146.     short                value;
  147.     StringPtr            rmtDN;
  148.     StringPtr            rmtName;
  149.     StringPtr            rmtSubaddress;
  150.     short                caState;
  151.     short                intExt;
  152.     short                callType;
  153.     short                dialType;
  154.     short                bearerType;
  155.     short                rate;
  156.     StringPtr            routeDN;
  157.     StringPtr            routeName;
  158.     StringPtr            routeSubaddress;
  159.     long                featureFlags;
  160.     long                otherFeatures;
  161.     long                telCAPrivate;
  162.     
  163. };
  164. typedef struct TELCAInOutMsgPB TELCAInOutMsgPB;
  165.  
  166.  
  167. typedef pascal void (*TELTermProcPtr)(Ptr pb);
  168. typedef pascal void (*TELDNProcPtr)(Ptr pb);
  169. typedef pascal void (*TELCAProcPtr)(Ptr pb);
  170.  
  171.  
  172. enum {
  173.  
  174.     telValidateMsg            = 0,
  175.     telDefaultMsg            = 1,
  176.  
  177.     telMgetMsg                = 0,
  178.     telMsetMsg                = 1,
  179.  
  180.     telSpreflightMsg        = 0,
  181.     telSsetupMsg            = 1,
  182.     telSitemMsg                = 2,
  183.     telSfilterMsg            = 3,
  184.     telScleanupMsg            = 4,
  185.  
  186.     telL2EnglishMsg            = 0,
  187.     telL2IntlMsg            = 1,
  188.  
  189.  
  190.     telNewMsg                = 0,
  191.     telDisposeMsg            = 1,
  192.     telSuspendMsg            = 2,
  193.     telResumeMsg            = 3,
  194.     telMenuMsg                = 4,
  195.     telEventMsg                = 5,
  196.     telActivateMsg            = 6,
  197.     telDeactivateMsg        = 7,
  198.  
  199.     telIdleMsg                = 50,
  200.     telOpenTermMsg            = 51,    
  201.     telResetTermMsg            = 52,
  202.     telCloseTermMsg            = 53,
  203.     telTermMsgHandMsg        = 54,
  204.     telClrTermMsgHandMsg    = 55,
  205.     telTermEventsSuppMsg    = 56,
  206.     telGetInfoMsg            = 57,    
  207.  
  208.     telCountDNsMsg            = 60,    
  209.     telDNLookupByIndexMsg     = 61,
  210.     telDNLookupByNameMsg    = 62,
  211.     telCallbackClearMsg        = 63,
  212.     telOtherFeatListMsg        = 64,
  213.     telOtherFeatImplMsg        = 65,
  214.     telToolFunctionsMsg        = 66,
  215.     telOtherFunctionMsg        = 67,
  216.  
  217.     telGetHookswMsg            = 70,
  218.     telSetHookswMsg            = 71,
  219.     telGetVolumeMsg            = 72,
  220.     telSetVolumeMsg            = 73,
  221.     telAlertMsg                = 74,
  222.     telGetDisplayMsg        = 75,
  223.     telSetDisplayMsg        = 76,
  224.  
  225.  
  226.     telDNSelectMsg            = 100,
  227.     telDNDisposeMsg            = 101,
  228.     telGetDNInfoMsg            = 102,
  229.     telGetDNFlagsMsg        = 103,
  230.     telDNMsgHandMsg            = 104,
  231.     telClrDNMsgHandMsg        = 105,
  232.     telDNEventsSuppMsg        = 106,
  233.  
  234.     telCountCAsMsg            = 110,
  235.     telCALookupMsg            = 111,
  236.     telCAMsgHandMsg            = 112,
  237.     telClrCAMsgHandMsg        = 113,
  238.     telCAEventsSuppMsg        = 114,
  239.     telSetupCallMsg            = 115,
  240.  
  241.     telForwardSetMsg        = 120,
  242.     telForwardClearMsg        = 121,
  243.     telDNDSetMsg             = 122,
  244.     telDNDClearMsg            = 123,
  245.  
  246.     telCADisposeMsg            = 200,
  247.     telGetCAStateMsg        = 201,
  248.     telGetCAFlagsMsg        = 202,
  249.     telGetCAInfoMsg            = 203,
  250.     telConnectMsg             = 204,
  251.     telDialDigitsMsg         = 205,
  252.     telAcceptCallMsg        = 206,
  253.     telRejectCallMsg        = 207,
  254.     telDeflectCallMsg        = 208,
  255.     telAnswerCallMsg        = 209,
  256.     telDropMsg                = 210,
  257.     telHoldMsg                = 211,
  258.     telRetrieveMsg            = 212,
  259.     telConfSplitMsg            = 213,
  260.     telTransfBlindMsg        = 214,
  261.     telCallbackSetMsg        = 215,
  262.     telCallbackNowMsg        = 216,
  263.     telCallPickupMsg         = 217,
  264.     telParkCallMsg             = 218,
  265.     telRetrieveParkedCallMsg= 219,
  266.     telVoiceMailAccessMsg    = 220,
  267.     telPagingMsg            = 221,
  268.     telIntercomMsg            = 222,
  269.  
  270.     telConfPrepMsg            = 230,
  271.     telConfEstMsg             = 231,
  272.     telTransfPrepMsg        = 232,
  273.     telTransfEstMsg            = 233
  274.  
  275. };
  276.  
  277.  
  278. #endif
  279.  
  280.  
  281.     
  282.